home *** CD-ROM | disk | FTP | other *** search
- global gWorld, gStates, gEnvironmentSound, gNextDIRFile, NULLrect, gHotRects, gCursorlist, gObjects, gTimerList, gGlobal, sQTCharSprite
-
- on enterE01
- if getaProp(getaProp(gObjects, #CarDash), #State) = #on then
- playSound("E01idle.aif", #cast, 0)
- end if
- set radObj to getaProp(gObjects, #CarRadio)
- if getaProp(radObj, #State) = #on then
- set whichStation to "E01rad" & getaProp(radObj, #station) & ".aif"
- playSound(whichStation, #AmbientLoop, 0)
- end if
- if gGlobal = 1 then
- setaProp(gStates, #Credits, getaProp(gStates, #Credits) + 90)
- end if
- set runoutCount to getaProp(getaProp(gObjects, #CarGasGauge), #runoutCount)
- Startthetimer(5, "doEmergencyBlinker")
- if runoutCount = 3 then
- PDARelease("J04m25p.mov")
- else
- if runoutCount = 6 then
- PDARelease("J04m19p.mov")
- end if
- end if
- if voidp(getaProp(getaProp(gStates, #BeenThere), #E01)) then
- PDARelease("J05coast.mov")
- end if
- end
-
- on doEmergencyBlinker
- set carEmerObj to getaProp(gObjects, #carEmer)
- if not voidp(getaProp(carEmerObj, #animator)) then
- setaProp(getaProp(carEmerObj, #animator), #pbPauseState, 1)
- end if
- set SpriteNum to getaProp(carEmerObj, #SpriteNum)
- if getaProp(getaProp(gObjects, #carEmerPar), #State) = #stranded then
- set initList to [#carEmerHotRect]
- set killList to []
- changeHotSpots(initList, killList, #true)
- set whichCast to getAt(getaProp(getaProp(carEmerObj, #cast), #FrameData), 2)
- else
- set whichCast to getaProp(getaProp(carEmerObj, #cast), #frameDataStart)
- setaProp(getaProp(gObjects, #carEmerPar), #State, #off)
- end if
- set the castNum of sprite SpriteNum to whichCast
- end
-
- on exitE01
- stopsound("E02knock.aif")
- end
-
- on enterE02
- setMapVar()
- set E04gas01Count to getaProp(getaProp(gObjects, #GasManQT), #E04gas01Count)
- if E04gas01Count = 1 then
- PDARelease("J04m15p.mov")
- setaProp(getaProp(gObjects, #GasManQT), #E04gas01Count, 2)
- else
- if E04gas01Count = 2 then
- PDARelease("J04m17p.mov")
- setaProp(getaProp(gObjects, #GasManQT), #E04gas01Count, 3)
- end if
- end if
- end
-
- on doTextFldFormat
- put " " into field "GasPINDisplay.txt"
- set the textFont of field "GasPINDisplay.txt" to "Monaco"
- set the textSize of field "GasPINDisplay.txt" to 12
- set the foreColor of field "GasPINDisplay.txt" to getIndex([8: 157, 16: 32766, 32: 16580595])
- put EMPTY into field "GasPINDisplay.txt"
- end
-
- on doMapSetUp
- setMapPos()
- end
-
- on enterE04
- pickGasMan(1)
- set gasManObj to getaProp(gObjects, #GasManQT)
- set curZone to getaProp(getaProp(gObjects, #carMap), #curZone)
- set stationNum to getPos(getaProp(gasManObj, #stationLocs), curZone)
- if stationNum = 12 then
- PDARelease("J04m20p.mov")
- end if
- end
-
- on exitE04
- if getaProp(getaProp(gObjects, #CarGasGauge), #runoutCount) = 4 then
- setaProp(getaProp(gObjects, #CarGasGauge), #runoutCount, 5)
- end if
- doResetPINScreen(#enterPIN, 0)
- end
-
- on enterE06
- global gLastKeyList
- set lastKey to string(getaProp(gLastKeyList, #RefName))
- set radObj to getaProp(gObjects, #CarRadio)
- if getaProp(radObj, #State) = #on then
- set whichStation to "E01rad" & getaProp(radObj, #station) & ".aif"
- playSound(whichStation, #AmbientLoop, 0)
- end if
- if (lastKey = "F64") or (lastKey = "G12") or (lastKey = "G22") or (lastKey = "H15") then
- set dashObj to getaProp(gObjects, #carDashView)
- setaProp(getaProp(dashObj, #cast), #UP, the number of cast "EFK.pct")
- setaProp(getaProp(gObjects, #pelletDispenserParent), #State, #on)
- set initList to [#lookAtPelletDispenser]
- set killList to [#carLookLeft, #carLookRight]
- changeHotSpots(initList, killList, #false)
- end if
- end
-
- on changeMultistate newStateNum, OBJref
- set OBj to getaProp(gObjects, OBJref)
- set newState to getAt(getaProp(OBj, #allStates), newStateNum)
- MakeDynamic(OBJref, #DisplayState, newState)
- set OBJSprite to getaProp(OBj, #SpriteNum)
- set newCast to the number of cast getaProp(getaProp(OBj, #cast), getaProp(OBj, #DisplayState))
- set the castNum of sprite OBJSprite to newCast
- end
-